Skip to content

(WiP) Separated Stochastic Selection#28

Closed
verab98 wants to merge 17 commits into
mainfrom
NumInitBasis
Closed

(WiP) Separated Stochastic Selection#28
verab98 wants to merge 17 commits into
mainfrom
NumInitBasis

Conversation

@verab98

@verab98 verab98 commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

Especially SelectionModule very much WiP and not yet working properly

Changes to SelectionModule:

  • alternative selection if singlet and triplet states
  • selection only happens for singlet only or triplet only
    blocks of coupled trajectories (not for S/T mixed blocks)
    Other changes:
  • Starting with more than one initial Gaussian
    (NumInitBasis > 1)
  • Displacing Gaussians using swarm in SamplingModule
    (this only works for the SOC model, as it assumes 1D)

Changes which are only print statements:

  • dynamics.f90
  • BundleCalcsModule.f90
  • OverlapModule.f90

verab98 added 5 commits March 16, 2026 11:29
Trajectories starting from a triplet are currently not initialised
as a multiplet. So, starting from a triplet should not be possible
until this is fixed.
Before, all TBFs would start with Amp = 1, leading to a norm > 1
Changed this by adjusting Amp initialisation,
but is that the right way to go?
for checking if Bundle with 2 initial TBFs is correctly created
but nothing else
In OverlapModule for checking bundle set up
Changes to SelectionModule:
- alternative selection if singlet and triplet states
- selection only happens for singlet only or triplet only
  blocks of coupled trajectories (not for S/T mixed blocks)
Other changes:
- Starting with more than one initial Gaussian
  (NumInitBasis > 1)
- Displacing Gaussians using swarm in SamplingModule
  (this only works for the SOC model, as it assumes 1D)
@codecov-commenter

codecov-commenter commented Apr 7, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 17.42424% with 327 lines in your changes missing coverage. Please review.
✅ Project coverage is 52.44%. Comparing base (5be543f) to head (c2a7a00).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/modules/SelectionModule.f90 12.83% 292 Missing ⚠️
src/modules/SamplingModule.f90 0.00% 26 Missing ⚠️
src/openfms.F90 18.18% 8 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #28      +/-   ##
==========================================
- Coverage   54.26%   52.44%   -1.83%     
==========================================
  Files          42       42              
  Lines        5998     6420     +422     
  Branches      800      840      +40     
==========================================
+ Hits         3255     3367     +112     
- Misses       2395     2705     +310     
  Partials      348      348              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

verab98 and others added 12 commits April 22, 2026 13:04
Death is now handled currectly (haha)
TrajIDs of DeadTrajs are not skipped anymore when killing
- Amplitudes are normalised to separated block and renormalised to
  total bundle after selection
- Issue of no normalisation if selection happens in first separated
  block fixed
- Index of trajectories to kill only changed if selection happened
  (added IsSelection to perform_stochastic_selection for this)
- Commented out a bunch of print statements
Relevant change:
- loop for translating indices which trajectory to kill now
  starts at 1 instead of 2
fixed the reordering of blocktrajid into blocks that correspond
to the stochastic selection modes (i.e. all Singlet-only block
trajids in one column, all Triplet-only in one column, before
this did not work if a block was spread over more than two
individual blocks)

Also, activated a set of useful prints for debugging
- realised that the TrajIDs can remain unchanged when copying from
  B1 into the spin-separated bundles
- realised that, with the TrajIDs remaining unchanged, all that needs
  to be copied back to B1 after a selection are the amplitudes
- restructured main loop of SelectionModule into one
- got rid of unused variables
- commented out print statements
- added a fix for Singlet and Triplet selection happening
  at the same time step
  (making sure that dead trajs of both selections are marked for death)
danielhollas pushed a commit that referenced this pull request Jun 5, 2026
Works the same way as the WiP branch in #28, but:
  - only changes in SelectionModule
  - commented out parts removed
  - kept only those commented out print statements that are usefull
SSGAIMS test will follow
@danielhollas

Copy link
Copy Markdown
Member

I believe this can now be closed, merged in #58 and #60

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants